import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: () => import('../views/Home.vue'),
      redirect: '/wei',
      children: [
        {
          path: '/wei',
          name: 'wei',
          component: () => import('../views/tab/wei.vue')
        },
        {
          path: '/ton',
          name: 'ton',
          component: () => import('../views/tab/ton.vue')
        },
        {
          path: '/fa',
          name: 'fa',
          component: () => import('../views/tab/fa.vue')
        },
        {
          path: '/main',
          name: 'main',
          component: () => import('../views/tab/mian.vue')
        }
      ]
    },
    {
      path: '/xiang',
      name: "xiang",
      component: () => import('../views/tiao/xiang.vue')
    },
    {
      path: '/',
      name: 'StatePage',
      component: () => import('../views/StatePage.vue')
    },
    {
      path: '/chat',
      component: () => import('../views/tiao/Chat.vue')
    },
    {
      path: '/found',
      component: () => import('../views/tiao/Found.vue')
    },
    {
      path: '/fas',
      component: () => import('../views/tiao/fas.vue')
    },
    {
      path: "/details",
      component: () => import("../views/details/details.vue")
    }
  ]
})

export default router
